﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using QLXuongCNTT.Object;
using QLXuongCNTT.DataLayers;

namespace QLXuongCNTT.ControlLayers
{
    class ctrlDMto
    {
        dtDMto Dmto;
        DataTable tbDMto;

        string error;

        public string Error
        {
            get { return error; }
            set { error = value; }
        }
        objTo obj_dmto;

        internal objTo obj_Dmto
        {
            get { return obj_dmto; }
            set { obj_dmto = value; }
        }
        public ctrlDMto()
        {
            Dmto = new dtDMto();
            obj_dmto = new objTo();
            error = "";
        }
        public DataTable getDMto()
        {
           
            tbDMto= Dmto.getDMto();
            error = Dmto.Error;
            return tbDMto;
        }
        public void AddTo()
        {
            DataRow row =Dmto.NewRow();
            row["mato"] =obj_dmto.Mato;
            row["tento"] = obj_dmto.Tento;
            Dmto.Addrow(row);
        }
        public bool save()
        {
            return Dmto.Save();
        }
    }
}
